package com.onlyxiahui.extend.query.hibernate.syntax.util;

import java.util.List;

import com.onlyxiahui.extend.query.hibernate.syntax.annotation.Bracket;
import com.onlyxiahui.extend.query.hibernate.syntax.annotation.Condition;
import com.onlyxiahui.extend.query.hibernate.syntax.annotation.Like;
import com.onlyxiahui.extend.query.hibernate.syntax.annotation.OrderBy;

/**
 * Description <br>
 * Date 2020-05-26 17:07:43<br>
 * 
 * @author XiaHui [onlovexiahui@qq.com]<br>
 * @since 1.0.0
 */
@OrderBy(value = { "id", "name" }, sort = "desc")
@OrderBy(value = { "number" }, sort = "desc")
public class UserQuery {

	private String id;

	@Bracket()
	private String name;

	@Bracket()
	@Bracket(group = "2")
	@Like(column = "name")
	private Long number;

	@Like(column = "name")
	private String likeName;

	@Bracket(group = "2")
	@Condition(equation = "in", column = "id")
	private List<String> ids;

	@Condition(equation = ">=", column = "timestamp")
	private long startTimestamp;

	@Condition(equation = "<=", column = "timestamp")
	private long endTimestamp;

	@Bracket(group = "3")
	@Like()
	@Condition(equation = "like", column = "name")
	@Condition(equation = "like", column = "number")
	private String text;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLikeName() {
		return likeName;
	}

	public void setLikeName(String likeName) {
		this.likeName = likeName;
	}

	public List<String> getIds() {
		return ids;
	}

	public void setIds(List<String> ids) {
		this.ids = ids;
	}

	public long getStartTimestamp() {
		return startTimestamp;
	}

	public void setStartTimestamp(long startTimestamp) {
		this.startTimestamp = startTimestamp;
	}

	public long getEndTimestamp() {
		return endTimestamp;
	}

	public void setEndTimestamp(long endTimestamp) {
		this.endTimestamp = endTimestamp;
	}

	public Long getNumber() {
		return number;
	}

	public void setNumber(Long number) {
		this.number = number;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}
}
